/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.cncqs.backend.store.entity;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import com.jeesite.common.entity.BaseEntity;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 企业下的门店Entity
 * @author cxy
 * @version 2019-04-16
 */
@Table(name="com_store", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="company_id", attrName="companyId", label="所属企业id"),
		@Column(name="name", attrName="name", label="门店名称"),
		@Column(name="type", attrName="type", label="门店类型"),
		@Column(name="area", attrName="area", label="门店区域"),
		@Column(name="detail_area", attrName="detailArea", label="详细地址"),
		@Column(name="longitude", attrName="longitude", label="longitude"),
		@Column(name="latitude", attrName="latitude", label="纬度"),
		@Column(name="manager_name", attrName="managerName", label="负责人姓名", queryType=QueryType.LIKE),
		@Column(name="manager_tel", attrName="managerTel", label="负责人电话"),
		@Column(name="open_time", attrName="openTime", label="经营开放时间"),
		@Column(name="open_status", attrName="openStatus", label="0", comment="0:正常；1：暂停；2停运"),
		@Column(name="property", attrName="property", label="经营性质", comment="经营性质：0自管；1托管；2其他"),
		@Column(name="scale", attrName="scale", label="规模", comment="规模：0小，1中，2大，3特大"),
		@Column(name="custom_num", attrName="customNum", label="用餐人数"),
		@Column(name="tag", attrName="tag", label="标签，多个标签用逗号隔开"),
		@Column(name="eat_type", attrName="eatType", label="餐饮类型"),
		@Column(name="cooking_style", attrName="cookingStyle", label="菜系"),
		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="update_date", isQuery=false),
		@Column(name="remarks", attrName="remarks", label="备注", queryType=QueryType.LIKE),
		@Column(name="company_name", attrName="companyName", label="所属公司", queryType=QueryType.LIKE),
		@Column(includeEntity=BaseEntity.class),
	}, orderBy="a.update_date DESC"
)
public class ComStore extends DataEntity<ComStore> {
	
	private static final long serialVersionUID = 1L;
	private Long companyId;		// 所属企业id
	private String name;		// 门店名称
	private Integer type;		// 门店类型
	private String area;		// 门店区域
	private String detailArea;		// 详细地址
	private String longitude;		// 经度
	private String latitude;		// 纬度
	private String managerName;		// 负责人姓名
	private String managerTel;		// 负责人电话
	private String openTime;		// 经营开放时间
	private Integer openStatus;		// 0:正常；1：暂停；2停运
	private Integer property;		// 经营性质：0自管；1托管；2其他
	private Integer scale;		// 规模：0小，1中，2大，3特大
	private String customNum;		// 用餐人数
	private String tag;		// 标签，多个标签用逗号隔开
	private String eatType;		// 餐饮类型
	private String cookingStyle;		// 餐饮类型
	private String companyName; //所属企业名称

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public ComStore() {
		this(null);
	}

	public ComStore(String id){
		super(id);
	}
	
	@NotNull(message="所属企业id不能为空")
	public Long getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}
	
	@NotNull(message="门店类型不能为空")
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	
	@NotBlank(message="门店区域不能为空")
	@Length(min=0, max=255, message="门店区域长度不能超过 255 个字符")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}
	
	@NotBlank(message="详细地址不能为空")
	@Length(min=0, max=255, message="详细地址长度不能超过 255 个字符")
	public String getDetailArea() {
		return detailArea;
	}

	public void setDetailArea(String detailArea) {
		this.detailArea = detailArea;
	}
	
	@NotBlank(message="longitude不能为空")
	@Length(min=0, max=10, message="longitude长度不能超过 10 个字符")
	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}
	
	@NotBlank(message="纬度不能为空")
	@Length(min=0, max=10, message="纬度长度不能超过 10 个字符")
	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}
	
	@NotBlank(message="负责人姓名不能为空")
	@Length(min=0, max=10, message="负责人姓名长度不能超过 10 个字符")
	public String getManagerName() {
		return managerName;
	}

	public void setManagerName(String managerName) {
		this.managerName = managerName;
	}
	
	@NotBlank(message="负责人电话不能为空")
	@Length(min=0, max=15, message="负责人电话长度不能超过 15 个字符")
	public String getManagerTel() {
		return managerTel;
	}

	public void setManagerTel(String managerTel) {
		this.managerTel = managerTel;
	}
	
	@NotBlank(message="经营开放时间不能为空")
	@Length(min=0, max=20, message="经营开放时间长度不能超过 20 个字符")
	public String getOpenTime() {
		return openTime;
	}

	public void setOpenTime(String openTime) {
		this.openTime = openTime;
	}
	
	@NotNull(message="0不能为空")
	public Integer getOpenStatus() {
		return openStatus;
	}

	public void setOpenStatus(Integer openStatus) {
		this.openStatus = openStatus;
	}
	
	@NotNull(message="经营性质不能为空")
	public Integer getProperty() {
		return property;
	}

	public void setProperty(Integer property) {
		this.property = property;
	}
	
	@NotNull(message="规模不能为空")
	public Integer getScale() {
		return scale;
	}

	public void setScale(Integer scale) {
		this.scale = scale;
	}
	
	@NotBlank(message="用餐人数不能为空")
	@Length(min=0, max=255, message="用餐人数长度不能超过 255 个字符")
	public String getCustomNum() {
		return customNum;
	}

	public void setCustomNum(String customNum) {
		this.customNum = customNum;
	}
	
	@NotBlank(message="标签，多个标签用逗号隔开不能为空")
	@Length(min=0, max=255, message="标签，多个标签用逗号隔开长度不能超过 255 个字符")
	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}
	
	@NotBlank(message="餐饮类型不能为空")
	@Length(min=0, max=255, message="餐饮类型长度不能超过 255 个字符")
	public String getEatType() {
		return eatType;
	}

	public void setEatType(String eatType) {
		this.eatType = eatType;
	}
	
	@NotBlank(message="餐饮类型不能为空")
	@Length(min=0, max=255, message="餐饮类型长度不能超过 255 个字符")
	public String getCookingStyle() {
		return cookingStyle;
	}

	public void setCookingStyle(String cookingStyle) {
		this.cookingStyle = cookingStyle;
	}
	
}